home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglbitmap.z / fglbitmap
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  136 lines

  1.  
  2.  
  3.  
  4. ffffggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))                  OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                  ffffggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllBBBBiiiittttmmmmaaaapppp - draw a bitmap
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllBBBBiiiittttmmmmaaaapppp( INTEGER*4 _w_i_d_t_h,
  14.                            INTEGER*4 _h_e_i_g_h_t,
  15.                            REAL*4 _x_o_r_i_g,
  16.                            REAL*4 _y_o_r_i_g,
  17.                            REAL*4 _x_m_o_v_e,
  18.                            REAL*4 _y_m_o_v_e,
  19.                            CHARACTER*256 _b_i_t_m_a_p )
  20.  
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  23.      _w_i_d_t_h, _h_e_i_g_h_t Specify the pixel width and height of the bitmap image.
  24.  
  25.      _x_o_r_i_g, _y_o_r_i_g  Specify the location of the origin in the bitmap image.
  26.                    The origin is measured from the lower left corner of the
  27.                    bitmap, with right and up being the positive axes.
  28.  
  29.      _x_m_o_v_e, _y_m_o_v_e  Specify the _x and _y offsets to be added to the current
  30.                    raster position after the bitmap is drawn.
  31.  
  32.      _b_i_t_m_a_p        Specifies the address of the bitmap image.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      A bitmap is a binary image.  When drawn, the bitmap is positioned
  36.      relative to the current raster position, and frame buffer pixels
  37.      corresponding to 1's in the bitmap are written using the current raster
  38.      color or index.  Frame buffer pixels corresponding to 0's in the bitmap
  39.      are not modified.
  40.  
  41.      ffffggggllllBBBBiiiittttmmmmaaaapppp takes seven arguments.  The first pair specifies the width and
  42.      height of the bitmap image.  The second pair specifies the location of
  43.      the bitmap origin relative to the lower left corner of the bitmap image.
  44.      The third pair of arguments specifies _x and _y offsets to be added to the
  45.      current raster position after the bitmap has been drawn.  The final
  46.      argument is a pointer to the bitmap image itself.
  47.  
  48.      The bitmap image is interpreted like image data for the ffffggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss
  49.      command, with _w_i_d_t_h and _h_e_i_g_h_t corresponding to the width and height
  50.      arguments of that command, and with _t_y_p_e set to GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP and _f_o_r_m_a_t set
  51.      to GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXX.  Modes specified using ffffggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee affect the
  52.      interpretation of bitmap image data; modes specified using
  53.      ffffggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr do not.
  54.  
  55.      If the current raster position is invalid, ffffggggllllBBBBiiiittttmmmmaaaapppp is ignored.
  56.      Otherwise, the lower left corner of the bitmap image is positioned at the
  57.      window coordinates
  58.  
  59.                                  x  = | x  - x  |
  60.                                   w      r    o
  61.  
  62.  
  63.  
  64.                                                                         PPPPaaaaggggeeee 1111
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. ffffggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))                  OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                  ffffggggllllBBBBiiiittttmmmmaaaapppp((((3333GGGG))))
  72.  
  73.  
  74.  
  75.                                  y  = | y  - y  |
  76.                                   w      r    o
  77.  
  78.      where (x ,y ) is the raster position and (x ,y ) is the bitmap origin.
  79.              r  r                               o  o
  80.      Fragments are then generated for each pixel corresponding to a 1 (one) in
  81.      the bitmap image.  These fragments are generated using the current raster
  82.      _z coordinate, color or color index, and current raster texture
  83.      coordinates.  They are then treated just as if they had been generated by
  84.      a point, line, or polygon, including texture mapping, fogging, and all
  85.      per-fragment operations such as alpha and depth testing.
  86.  
  87.      After the bitmap has been drawn, the _x and _y coordinates of the current
  88.      raster position are offset by _x_m_o_v_e and _y_m_o_v_e.  No change is made to the
  89.      _z coordinate of the current raster position, or to the current raster
  90.      color, texture coordinates, or index.
  91.  
  92. NNNNOOOOTTTTEEEESSSS
  93.      To set a valid raster position outside the viewport, first set a valid
  94.      raster position inside the viewport, then call ffffggggllllBBBBiiiittttmmmmaaaapppp with NULL as the
  95.      _b_i_t_m_a_p parameter and with _x_m_o_v_e and _y_m_o_v_e set to the offsets of the new
  96.      raster position. This technique is useful when panning an image around
  97.      the viewport.
  98.  
  99. EEEERRRRRRRROOOORRRRSSSS
  100.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is negative.
  101.  
  102.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllBBBBiiiittttmmmmaaaapppp is executed between the
  103.      execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd.
  104.  
  105. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  106.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN
  107.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____CCCCOOOOLLLLOOOORRRR
  108.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____DDDDIIIISSSSTTTTAAAANNNNCCCCEEEE
  109.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____IIIINNNNDDDDEEEEXXXX
  110.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDDSSSS
  111.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCUUUURRRRRRRREEEENNNNTTTT____RRRRAAAASSSSTTTTEEEERRRR____PPPPOOOOSSSSIIIITTTTIIIIOOOONNNN____VVVVAAAALLLLIIIIDDDD
  112.  
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      ffffggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss, ffffggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee, ffffggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr, ffffggggllllRRRRaaaasssstttteeeerrrrPPPPoooossss
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.                                                                         PPPPaaaaggggeeee 2222
  133.  
  134.  
  135.  
  136.